<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app-6">
        <ol>
            <todo-item 
            v-for="item in groceyList" 
            v-bind:todo=item 
            v-bind:key="item.id"></todo-item>
        </ol>
    </div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
<script>
     Vue.component('todo-item', {
        props: ['todo'],
        template: '<li>{{todo.text}}</li>',
    });
    var app = new Vue({
        el: '#app-6',
        data:{
            groceyList:[
                {id:0, text:'蔬菜'},
                {id:1, text:'奶酪'},
                {id:2, text:'随便其他什么人吃的东西'},
            ]
        }
    });
</script>
</html>